home *** CD-ROM | disk | FTP | other *** search
/ Aminet 20 / Aminet 20 (1997)(GTI - Schatztruhe)[!][Aug 1997].iso / Aminet / dev / c / CLib37x.readme < prev    next >
Text File  |  1997-07-13  |  16KB  |  327 lines

  1. Short:    Example.library in 100% C (SAS/Storm/Maxon/...)
  2. Author:   Andreas R. Kleinert, Helmut Hummel, Stefan Fuchs, Aaron Digulla
  3. Uploader: Andreas_Kleinert@t-online.de
  4. Type:     dev/c
  5.  
  6.  
  7.   example.library V37.11 (24.6.97)
  8.  
  9.   An Amiga shared library in 100 % C language - coming with sources.
  10.  
  11.   Compiler Checklist:        Compiler           Support
  12.                              -------------------------------
  13.    (see README.<compiler>    SAS/C 6.5x         yes
  14.     for more information)    MaxonC 3.x         yes
  15.                              StormC 2.x         yes
  16.                              DICE 3.x           (not tested)
  17.                              GCC 2.7.2.1        yes
  18.                              AztecC             (not tested)
  19.                              vbcc               (in work)
  20.  
  21.   OS Checklist:              Operating Sustem   Support
  22.                              -------------------------------
  23.                              Amiga OS 37-40     yes
  24.                              AROS 1.x           yes (AROS source tree)
  25.  
  26.  
  27.   Original SAS/C and StormC version (C) 1996-97 by Andreas R. Kleinert,
  28.   MaxonC version changes done 1996 by Helmut Hummel.
  29.   GCC version changes done 1997 by Stefan Fuchs.
  30.   AROS source tree done 1997 by Aaron Digulla.
  31.   All rights reserved.
  32.   ----------------------------------------------------------------------
  33.   This sample library intends to make Amiga shared library sources
  34.   compileable with any available Amiga C compiler - without any
  35.   changes to the source code.
  36.   And maybe in the future also running under any Amiga compatible
  37.   operating system with any CPU.
  38.  
  39.   The first goal seams to be easily done: nearly any noticeable compiler
  40.   for the Amiga does support generation of libraries by special
  41.   linker commands and pre-generated object files.
  42.  
  43.   But when looking into the details, one will find out, that these
  44.   linker functionality just reduces the influence of the programmer
  45.   on how his sources are handled, that the pre-generated object
  46.   files just originally were done in Assembler, and that each compiler
  47.   does define its own interface definitions and usage rules.
  48.  
  49.   But as a programmer, it is important to have control over the _complete_
  50.   source code and to be able to compile it _anywhere_ with only
  51.   minor changes, even better without any changes.
  52.  
  53.   Since most Amiga system modules - noticeable Libraries, Devices and
  54.   Resources - do have startup-modules and other larger parts completely
  55.   written in Assembler language, the most important task for getting
  56.   inter-compiler and operating system independant sources in my opinion
  57.   is, to completely migrate the interfaces to C language (but different
  58.   to AROS, for example, it is most important, to keep the sources running
  59.   under the current 68k AmigaOS in the _first_ place).
  60.  
  61.   This goal basically has been reached already, still missing of
  62.   course are some of the less Amiga-native compilers and of course
  63.   tests with any kind of "AmigaOS for PowerPC".
  64.  
  65.   But since Assembler is nearly as portability-hostile as BCPL _today_
  66.   we may come quite close to the goal defined above by just moving
  67.   towards C.
  68.  
  69.   Translate your 68k-assembler library startup-codes smartly
  70.   to C by simply using this source-code as an advice how to do it.
  71.  
  72.   For testing: install the (re)compiled example.library to LIBS: and
  73.   start the test program - it should pop up a requester, then.
  74.  
  75.   If you can submit adjustments for the other compilers as mentioned
  76.   above: feel free to send these.
  77.   ---
  78.   Feel free to use this source for own projects.
  79.  
  80.   It is allowed to be spread and distributed anywhere, as far
  81.   as my consent is concerned.
  82.  
  83.   Amiga International, or the current owner of the technologie,
  84.   is allowed to always put this source on their newest
  85.   Developer CD-ROM.
  86.  
  87.   Thanks and credits will always be appreciated - for example,
  88.   you MAY, but NEED NOT:
  89.   give me credits in your program's docs, send me keyfiles for
  90.   your programs using the library, and so on.
  91.   But that's simply voluntarily.
  92.  
  93.    _________________________________________________________
  94.   |      You may reach me the following way.                |
  95.   |    Send bug-reports, money or whatever to:              |
  96.   |---------------------------------------------------------|
  97.   |        * SuperView Development & Registration *         |
  98.   |          * DRAFU Development & Registration *           |
  99.   |       * Image Engineer Registration Site Europe *       |
  100.   |                                                         |
  101.   |                                                         |
  102.   |                  PerSuaSiVe SoftWorX                    |
  103.   |                                                         |
  104.   |                  Andreas R. Kleinert                    |
  105.   |                  Sandstrasse 1                          |
  106.   |                  D-57072 Siegen                         |
  107.   |                  Germany, Europe                        |
  108.   |                                                         |
  109.   | Any snail mail to the old address will still be routed. |
  110.   |                                                         |
  111.   |                  Phone:  +49-271-22869 also FAX + AM    |
  112.   |                          +49-271-22838                  |
  113.   |                                                         |
  114.   |                  Weekdays after 17.00h.                 |
  115.   |                                                         |
  116.   |         When calling via phone you may leave a message, |
  117.   |         if I'm not available - but don't expect me      |
  118.   |         calling back to USA, Australia, ... since       |
  119.   |         german phone rates are HIGHLY expensive.        |
  120.   |_________________________________________________________|
  121.  
  122.     http://home.t-online.de/home/Andreas_Kleinert/
  123.  
  124.   eMail:
  125.  
  126.         Please send binaries via ARK@COB.wwbnet.de, and keep
  127.         them smaller than 16 KB. Please think twice before
  128.         sending them - my postbox is not unlimited in size.
  129.  
  130.            - Fido    Andreas Kleinert 2:2457/350.18
  131.            - Usenet
  132.                      Andreas_Kleinert@superview.ftn.neckar-alb.de (Fido-Gate)
  133.                      Andreas_Kleinert@t-online.de                 (T-Online)
  134.                      ARK@COB.wwbnet.de                            (Z-Netz)
  135.                      ARK@amigaworld.com                           (AmigaWorld)
  136.  
  137.            - If nothing else works, try one of these public
  138.              Fido-Usenet gateways:
  139.  
  140.                In Germany:
  141.                  Andreas_Kleinert@p18.f350.n2457.z2.fido.sub.org
  142.  
  143.                From USA or elsewhere:
  144.                  Andreas_Kleinert@p18.f350.n2457.z2.fidonet.org
  145.  
  146.  
  147.  Known Bugs:        - some versions of DOpus and all Installer versions
  148.                       can't fetch the version information from the
  149.                       library binary due to some bugs in their code.
  150.                       Newer DOpus versions have this fixed and C:Version
  151.                       for example did that task always.
  152.  
  153.  
  154.  History:
  155.  
  156.  V37.11 (24.6.97) : - added "known bugs" section
  157.                     - LibInit now delocates library base on error
  158.                       (NULL return)
  159.                       (-> Gunter Nikl)
  160.                     - added AROS version, and created an additional
  161.                       source tree for it, since I did not get it compiled
  162.                       with SAS/C 6.57 and there's perhaps additional
  163.                       #ifdef stuf to be done. Anyone likes to merge these ?
  164.                       (-> Aaron Digulla)
  165.  
  166.  V37.10 (6.4.97) :  - added GCC version by Stefan Fuchs, snfuchs@sokrates.franken.de.
  167.                       Thanks !
  168.                     - some small changes to docs, includes and comments
  169.                     - still missing: DICE, Aztec, vbcc. Who does it ?
  170.                     - fixed ftn email address
  171.  
  172.  V37.6 (27.3.97) :  - finetuning
  173.  
  174.  V37.5 (24.1.97) :  - rewrote docs
  175.                     - added basic support for compiler independent
  176.                       register naming and SAS/C keyword replacements
  177.                       (compiler.h). Thus sources now should be easily
  178.                       adaptable for GCC as well.
  179.  
  180.  V37.4 (8.1.97) :   - added FD file
  181.                     - added new pragma file (and dir) as
  182.                       include/pragma/example_lib.h
  183.                       which works with Aztec, Maxon, Storm,
  184.                       DICE and SAS C compilers.
  185.                       Thanks to fd2pragma and Dirk Stoecker.
  186.                     - some fixes to the readme files
  187.                     - updated eMail list
  188.  
  189.  V37.3 (3.1.97) :   - slightly changed SCOPTIONS
  190.                     - fixed some style things (APTR and library casts)
  191.                     - changed note about library opening at L_OpenLibs()
  192.                     - now compileable with StormC 2.0 as well
  193.                       (not tested with 1.1) - see readme file for StormC
  194.                     - added project file for StormC 2.0, smakefile still
  195.                       present - select, which one you'd like to use
  196.  
  197.  V37.2 (12.12.96) : - applied some more changes and fixes
  198.                       (-> suggested by Helmut Hummel)
  199.                     - added icons
  200.                       (-> from Helmut Hummel)
  201.  
  202.  V37.1 (4.12.96) : - bumped version to V37
  203.                    - added MaxonC 3.x version by applying changes
  204.                      to the SAS/C sources and adding Maxon
  205.                      specific make and configuration files
  206.                      (-> all done by Helmut Hummel, see Readme.MAXON)
  207.                    - added StormC support
  208.                    - yet missing: DICE, Aztec, GNU. Who does it ?
  209.  
  210.  V1.4 (30.11.96) : - added SAS/C specific Ctrl-C disabling code
  211.                    - made some workarounds compiler sensitive
  212.                    - redone all with SAS/C V6.57
  213.                    - 944 Bytes ;-)
  214.  
  215.  V1.3 (13.9.96) :  - when starting lib as executable, -1 must be returned
  216.                    - now caching SysBase
  217.                    - added some comments, where changes should not
  218.                      be applied
  219.                    - added note about sharing library bases
  220.                    - documented and modified sample function,
  221.                      so that correct a0/a1/d0/d1 and a6 usage becomes
  222.                      more obviously and verbose
  223.                    - still 940 bytes ;-)
  224.  
  225.  V1.2 (5.9.96)  :  - fixed some things resulting out of a
  226.                      discussion in Z-Netz
  227.  
  228.  V1.1 (1.9.96)  :  - small changes in style
  229.                      (only bumped versions of changed modules):
  230.                        o moved "examplebase.h" to include/example/
  231.                          (so also adjusted LibInit.c, StartUp.c
  232.                           and SCOPTIONS for reflecting that)
  233.                        o SampleFuncs.h did contain wrong prototype
  234.                          (did not matter, since only used for
  235.                           ULONG function table within StartUp.c)
  236.                        o explicitely __aligned ROMTag structure
  237.  
  238.  V1.0 (14.8.96) : - first release
  239.  
  240.  
  241.  ---
  242.  All mentioned trademarks are subjects to their owners.
  243.  
  244.  
  245. ============================= Archive contents =============================
  246.  
  247. Original  Packed Ratio    Date     Time    Name
  248. -------- ------- ----- --------- --------  -------------
  249.     1720     433 74.8% 11-Dec-96 15:39:54 +bin.info
  250.     5248    3480 33.6% 05-Dec-96 11:46:22 +TestExampleLib
  251.      450     230 48.8% 11-Dec-96 15:49:34 +TestExampleLib.info
  252.     1884     861 54.2% 01-Apr-97 11:27:18 +ReadMe.GCC
  253.     1201     683 43.1% 25-Jan-97 10:21:22 +ReadMe.MAXON
  254.      486     280 42.3% 27-Mar-97 10:33:08 +ReadMe.SAS
  255.      915     480 47.5% 25-Jan-97 10:21:12 +ReadMe.STORM
  256.     1720     433 74.8% 11-Dec-96 15:39:56 +source.info
  257.      125     117  6.4% 08-Jan-97 19:09:50 +example.fd
  258.      425     247 41.8% 05-Dec-96 11:45:24 +example_protos.h
  259.      289     185 35.9% 05-Dec-96 11:44:58 +example.h
  260.      654     319 51.2% 11-Dec-96 15:00:22 +examplebase.h
  261.      477     247 48.2% 08-Jan-97 19:10:26 +example_lib.h
  262.      311     207 33.4% 05-Dec-96 11:45:38 +example_pragmas.h
  263.      330     207 37.2% 05-Dec-96 11:45:50 +example.h
  264.     1720     433 74.8% 11-Dec-96 15:39:42 +lib_source.info
  265.     3811    1234 67.6% 01-Apr-97 11:33:26 +compiler.h
  266.       25      25  0.0% 05-Dec-96 12:07:46 +make_storm.bat
  267.      487     240 50.7% 01-Apr-97 11:27:18 +makefile.gcc
  268.      419     164 60.8% 11-Dec-96 15:31:14 +makefile.MAXON
  269.      347     232 33.1% 05-Dec-96 11:36:28 +makefile.MAXON.info
  270.      381     232 39.1% 05-Dec-96 11:36:28 +mcpp.SESSION
  271.     1596     827 48.1% 01-Apr-97 11:36:46 +SampleFuncs.c
  272.      375     249 33.6% 01-Apr-97 11:27:18 +SampleFuncs.h
  273.      216     194 10.1% 01-Apr-97 11:38:24 +SampleFuncs.o
  274.      128     105 17.9% 03-Jan-97 15:29:36 +SCOPTIONS
  275.      395     148 62.5% 05-Dec-96 11:36:28 +smakefile
  276.       95      85 10.5% 05-Dec-96 11:36:28 +smakefile.wth
  277.     1757     595 66.1% 03-Jan-97 15:44:56 +storm_project.¶
  278.      624     350 43.9% 03-Jan-97 15:44:56 +storm_project.¶.info
  279.      622     269 56.7% 03-Jan-97 15:44:30 +storm_smakefile
  280.      119     100 15.9% 05-Dec-96 11:36:28 +SCOPTIONS
  281.      256     105 58.9% 05-Dec-96 11:36:28 +smakefile
  282.     5248    3480 33.6% 05-Dec-96 11:46:22 +TestExampleLib
  283.      673     374 44.4% 05-Dec-96 11:46:12 +TestExampleLib.c
  284.      835     394 52.8% 05-Dec-96 11:36:28 +TestExampleLib.info
  285.      300     242 19.3% 05-Dec-96 11:46:20 +TestExampleLib.o
  286.      125     117  6.4% 08-Jan-97 19:09:50 +example.fd
  287.      425     247 41.8% 05-Dec-96 11:45:24 +example_protos.h
  288.      483     246 49.0% 11-Apr-97 13:44:16 +example.h
  289.      277     177 36.1% 11-Apr-97 13:42:02 +example.h
  290.      620     315 49.1% 11-Apr-97 13:41:44 +examplebase.h
  291.      477     247 48.2% 08-Jan-97 19:10:26 +example_lib.h
  292.      311     207 33.4% 05-Dec-96 11:45:38 +example_pragmas.h
  293.      564     293 48.0% 11-Apr-97 13:43:52 +example.h
  294.     1720     433 74.8% 11-Dec-96 15:39:42 +lib_source.info
  295.     4522    1489 67.0% 11-Apr-97 14:56:44 +compiler.h
  296.     3649    1378 62.2% 11-Apr-97 14:55:38 +LibInit.c
  297.       25      25  0.0% 05-Dec-96 12:07:46 +make_storm.bat
  298.      648     297 54.1% 11-Apr-97 15:00:08 +makefile.aros
  299.      487     240 50.7% 01-Apr-97 12:27:18 +makefile.gcc
  300.      419     164 60.8% 11-Dec-96 15:31:14 +makefile.MAXON
  301.      347     232 33.1% 05-Dec-96 11:36:28 +makefile.MAXON.info
  302.      381     232 39.1% 05-Dec-96 11:36:28 +mcpp.SESSION
  303.     1641     833 49.2% 11-Apr-97 14:58:20 +SampleFuncs.c
  304.      497     307 38.2% 11-Apr-97 14:57:34 +SampleFuncs.h
  305.      128     105 17.9% 03-Jan-97 15:29:36 +SCOPTIONS
  306.      395     148 62.5% 05-Dec-96 11:36:28 +smakefile
  307.       95      85 10.5% 05-Dec-96 11:36:28 +smakefile.wth
  308.     5344    1649 69.1% 11-Apr-97 14:52:32 +StartUp.c
  309.     1757     595 66.1% 03-Jan-97 15:44:56 +storm_project.¶
  310.      624     350 43.9% 03-Jan-97 15:44:56 +storm_project.¶.info
  311.      622     269 56.7% 03-Jan-97 15:44:30 +storm_smakefile
  312.      500     259 48.2% 11-Apr-97 15:00:48 +makefile.aros
  313.      119     100 15.9% 05-Dec-96 11:36:28 +SCOPTIONS
  314.      256     105 58.9% 05-Dec-96 11:36:28 +smakefile
  315.      664     382 42.4% 11-Apr-97 13:41:24 +TestExampleLib.c
  316.      835     394 52.8% 05-Dec-96 11:36:28 +TestExampleLib.info
  317.      872     593 31.9% 24-Jun-97 10:58:50 +example.library
  318.     1838     955 48.0% 24-Jun-97 10:43:22 +ReadMe.AROS
  319.    10940    3939 63.9% 24-Jun-97 11:01:46 +ReadMe_First
  320.      872     593 31.9% 24-Jun-97 10:58:48 +example.library
  321.     3356    1280 61.8% 24-Jun-97 10:57:40 +LibInit.c
  322.      888     543 38.8% 24-Jun-97 10:58:48 +LibInit.o
  323.     4663    1489 68.0% 24-Jun-97 10:58:12 +StartUp.c
  324.      804     492 38.8% 24-Jun-97 10:58:46 +StartUp.o
  325. -------- ------- ----- --------- --------
  326.    89854   40290 55.1% 25-Jun-97 00:04:42   76 files
  327.